
import {
    NavigationGuardNext,
    NavigationGuardReturn,
    RouteLocationNormalized,
    RouteLocationNormalizedLoaded,
    RouteRecordRaw,
    _Awaitable,
    createRouter,
    createWebHistory,
} from "vue-router";
const routers: RouteRecordRaw[] = [
    {
        path: "/",
        name: 'index',
        component: () => import('@/layout/layout.vue'),
        redirect:'/chat',
        meta: {
            title: "首页",
        },
        children: [
            {
                path: "/chat",
                name: 'chat',
                component: () => import('@/views/chat/index.vue'),
                meta: {
                    title: "对话",
                },
                children: []
            },
        ]
    },

    {
        path: "/login",
        name: 'login',
        component: () => import('@/views/login/index.vue'),
        meta: {
            title: "登陆",
        },
        children: []
    },

]
const router = createRouter({
    history: createWebHistory(),
    routes: routers,
});

export default router;